/*
 * @Author: Sa
 * @Date: 2018-10-03 13:43:59 
 * @Last Modified by: mikey.zhaopeng
 * @Last Modified time: 2018-10-28 20:14:52
 */
import Vue from 'vue'
import Router from 'vue-router'
import HeaderLogin from '@/components/HeaderLogin'
import Header from '@/components/Header'
import Footer from '@/components/Footer'
import Login from '@/modules/login/Login'
import Register from '@/modules/register/register'
import LoginForgetPwd from '@/modules/login/LoginForgetPwd'
import Home from '@/modules/home/Home'
import UserCenter from '@/modules/user/UserCenter'
import ProductList from '@/modules/product/ProductList'
import ProductDetail from '@/modules/product/ProductDetail'
import Cart from '@/modules/cart/Cart'
import OrderConfrim from '@/modules/order/OrderConfirm'
import OrderList from '@/modules/order/OrderList'
import Address from '@/modules/address/Address'
import Payment from '@/modules/payment/payment'

//账单模块
import AccountMsg from '@/modules/bill/AccountManagement'

//星运模块
import Memo from '@/modules/stars/memo/MemoManagement'

//测试模块
import test from '@/test/Test.vue'
Vue.use(Router)

const baseTitle = 'CampusO2O-'

export default new Router({
  routes: [
    {
      path: '/pay',
      name: ' Payment',
      component:  Payment,
      meta : {
        title : baseTitle+'支付'
      }
    },
    {
      path: '/orders',
      name: ' OrderList',
      component:  OrderList,
      meta : {
        title : baseTitle+'订单列表'
      }
    },
    {
      path: '/address',
      name: ' Address',
      component:  Address,
      meta : {
        title : baseTitle+'收货地址'
      }
    },
    {
      path: '/orderConfrim',
      name: ' OrderConfrim',
      component:  OrderConfrim,
      meta : {
        title : baseTitle+'确认订单'
      }
    },
    {
      path: '/cart',
      name: ' Cart',
      component:  Cart,
      meta : {
        title : baseTitle+'购物车'
      }
    },
    {
      path: '/product',
      name: ' ProductDetail',
      component:  ProductDetail,
      meta : {
        title : baseTitle+'商品详情'
      }
    },
    {
      path: '/product-list',
      name: ' ProductList',
      component: ProductList,
      meta : {
        title : baseTitle+'商品列表'
      }
    },
    {
      path: '/test',
      name: ' test',
      component:  test
    },
    {
      path: '/',
      name: ' Header',
      component:  Header
    },
    {
      path : '/footer',
      name : 'Footer',
      component : Footer
    },
    {
      path:'/login',
      name : 'Login',
      component : Login,
      meta : {
        title : baseTitle+'登录'
      }
    },
    {
      path:'/register',
      name : 'Register',
      component : Register,
      meta : {
        title : baseTitle+'注册'
      }
    },
    {
      path:'/forget',
      name : 'LoginForgetPwd',
      component : LoginForgetPwd,
      meta : {
        title : baseTitle+'找回密码'
      }
    },
    {
      path:'/home',
      name : 'Home',
      component : Home,
    
    },
    {
      path:'/user-center',
      name : 'UserCenter',
      component : UserCenter,
      meta : {
        title : baseTitle+'找回密码'
      }
    },

    // 账单中心
    {
      path:'/account',
      name : 'AccountMsg',
      component : AccountMsg,
      meta : {
        title : baseTitle+'个人账单'
      }
    },

    //星运模块
    {
      path:'/stars/memo',
      name : 'Memo',
      component : Memo,
      meta : {
        title : baseTitle+'备忘录'
      }
    }
  ]
})
